<?php 

	echo '<div class="message-menu">';
	$inboxUrlArray = array('controller' =>'messages', 'action'=>'inbox');
	$sentUrlArray = array('controller' =>'messages', 'action'=>'sent');
	$composeUrlArray = array('controller' =>'messages', 'action'=>'write');
	echo '<a href="'.$this->url($inboxUrlArray, null, true).'">Inbox</a>';
	echo ' | ';
	echo '<a href="'.$this->url($composeUrlArray, null, true).'">Write new message</a>';
	echo ' | ';
	echo '<a href="'.$this->url($sentUrlArray, null, true).'">Sent</a>';
	
	echo '</div>';
	echo '<br/>';
	
	$row_index = 0;
	echo '<div class="message-list">';
	//table head - general information
	$html = '';
	$html .= '<div class="table-head">';
	$html .= '<span class="left count-row">#</span>';		
	$html .= '<span class="left">Date</span>';
	$html .= '<span class="left">Dominator</span>';
	$html .= '<span class="left nob">Title</span>';
	$html .= '</div>';
	echo $html;
	//end table head
foreach ($this->paginator as $inboxListPage) {
	$row_index++;
	// create row for every player
	$html = '';
	
	$urlArray = array('controller' =>'messages', 'action'=>'read');
	$html .= '<a href="'.$this->url($urlArray, null, true).'?m='.$inboxListPage['id'].'" class="">';
	$html .= '<div class="'. ( ($row_index % 2) ? 'odd' : 'even' ) .'">';
	$html .= '<span class="left count-row">  </span>';		
	$html .= '<span class="left">'. $inboxListPage['date'] .'</span>';
	$html .= '<span class="left">'. $inboxListPage['toAlias'] .'</span>';
	$html .= '<span class="left nob">'. $inboxListPage['title'] .'</span>';
	$html .= '</div>';
	$html .= '</a>';
	echo $html;
 }
  	echo '</div>';
  	echo '<div class="pagination">';
  	echo $this->gotoPage;
  	echo $this->paginationControl($this->paginator,'sliding', 'pagination.phtml');  	
    echo '</div>';

